<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateDancesTable extends Migration
{
    /**
     * 课程列表.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('dances', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name', 255)->comment('课程名称 ');
            $table->string('dance_names', 255)->comment('课程种类');
            $table->integer('teacher_id')->comment('授课老师');
            $table->integer('begin_time')->default(0)->comment('上课时间');
            $table->integer('end_time')->default(0)->comment('截止时间');
            $table->decimal('course_price', 11, 2)->default('0.00')->comment('课程费用');
            $table->decimal('vip_price', 11, 2)->default('0.00')->comment('vip价格');
            $table->string('address', 500)->comment("上课地点");
            $table->string('contents', 500)->comment("舞蹈内容");
            $table->string('images', 500)->comment("课程封面");
            $table->integer('sort')->default(0)->comment('排序');
            $table->integer('league_number')->default(0)->comment('团课总人数');
            $table->integer('league_subscribe_number')->default(0)->comment('团课已约人数');
            $table->tinyInteger('dance_status')->default(0)->index('dance_status')->comment('私教状态 0未约 1,已约');
            $table->tinyInteger('status')->default(0)->index('status')->comment("0启用/1禁用");
            $table->tinyInteger('types')->default(0)->index('types')->comment("0团课/1私教");
            $table->text('remark')->comment('备注');
            $table->timestamps();
            $table->engine = 'InnoDB';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('dances');
    }
}
